// TOWN SCRIPT
//    Town 4: Thessalonica

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documentation. States you write
// yourself should be numbered from 10-100.

// flags:
// 4, 0 = entry message flag
// 4, 1 = smelt message
// 4, 2 = Jack's dialog change flag
// 4, 3 = house message
// 4, 4 = warehouse message

begintownscript;

variables;

short choice;

body;

beginstate INIT_STATE;
	turn_off_training(TRUE);
	set_crime_tolerance(5);

	set_name(6, "Guard");
	set_name(7, "Guard");
	set_name(10, "Captain Jim");
	set_char_dialogue_pic(10, 1907, 0);
	set_name(11, "Cora");
	set_char_dialogue_pic(11, 531, 0);
	set_name(12, "Jack Robin");
	set_char_dialogue_pic(12, 541, 0);
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_flag(4, 0) == FALSE) {
		set_flag(4, 0, TRUE);
		reset_dialog();
		add_dialog_str(0, "The mining city of Thessalonica is strangely quiet.  Parks, foliage and greenery abound within the walls.", 0);
		add_dialog_str(1, "For a mining city, it's remarkably clean and pleasant, not at all dirty like others you've been to.", 0);
		add_dialog_str(2, "With the mines inactive and nothing to process, the smelts and smithies of the city sit empty gathering dust.", 0);
		add_dialog_str(3, "A few miners occasionally attempt to work, but are rebuffed after leaving the safety of the city walls.", 0);
		add_dialog_str(4, "They mainly sit idly by, waiting for the day the dark cloud over The Wilderness is lifted and the mines reopen.", 0);
		add_dialog_choice(0, "Ok");
		choice = run_dialog(TRUE);
	}
break;

beginstate 10;
	if (get_flag(4, 1) == FALSE) {
		set_flag(4, 1, TRUE);
		message_dialog("The smelter is empty and silent, cobwebs adorn the walls and corners.",
			"A row of unlit fire pits down the center of the room stand as testimony to the inactivity of the place.");
	}
break;

beginstate 11;
	if (get_flag(4, 3) == FALSE) {
		set_flag(4, 3, TRUE);
		message_dialog("The house smells a bit musty, like no one has been in it for a while.",
			"'One day' you think 'the owner will return.'");
	}
break;

beginstate 12;
	if (get_flag(4, 4) == FALSE) {
		set_flag(4, 4, TRUE);
		message_dialog("The massive ore storage warehouse is completely empty, with the exception of a few webs.",
			"If the mines were in operation, this place would be full of ore waiting to be processed.");
	}
break;
